#pragma once
#include <iostream>
#include "const.h"
class MsgNode
{
public:
	MsgNode(short total_len);
	~MsgNode();
	void Clear();
	short _len;
	short _cur_len;
	char* _data;
};

class RecvNode :public MsgNode
{
	friend class CSession;
public:
	RecvNode(short max_len, short msg_id);
	short GetMsgId() const;
private:
	short _msg_id;
};

class SendNode :public MsgNode
{
public:
	SendNode(const char* msg, short max_len, short msg_id);
private:
	short _msg_id;
	char* msg;
};

